# 任意个数的数字相乘
def fn2(*a):
    result = 1
    for i in a:
        if i == 0:
            result *= 0
        result *= i
    return result


print(fn2(-10, -20, 12))
print(fn2(12))

print('======================分割线==========================')


# 任意个数数字累加
def fn(*a):
    result = 0
    for i in a:
        result += i
    return result


print(fn(10, 20, 30))
print(fn(-10, -20, -50))
print(fn(10))
